package com.fly.ringdemo;

import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.fly.ringdemo.exception.OnDrawingException;
import com.fly.ringdemo.view.RingView;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        RingView ring = (RingView) findViewById(R.id.ring);
        ring.setColors(new int[]{Color.RED, Color.GREEN, Color.BLUE, Color.GRAY, Color.YELLOW});
        ring.setValues(new int[]{5, 12, 13, 11, 10});
        try {
            ring.startDraw();
        } catch (OnDrawingException e) {
            e.printStackTrace();
        }
    }
}
